﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;

namespace AppShare.Web
{
    public partial class Site : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ModifyBrowserSpecificStyle();
        }

        private void ModifyBrowserSpecificStyle()
        {
            if (Request.Browser.Browser == "IE")
            {
                styleLink.Href = String.Format(CultureInfo.InvariantCulture,
                    "~/App_Themes/Classic/css/style-ie{0}.css",
                    Request.Browser.MajorVersion);
            }
            else
            {
                styleLink.Visible = false;
            }
        }

        public string GetVersion()
        {
            return GetType().BaseType.Assembly.GetName().Version.ToString();
        }
    }
}